﻿using System;
using System.ComponentModel.DataAnnotations;

namespace WomanMotion.WebApi.Model.Dtos.Users
{
    /// <summary>
    /// 用户登录DTO
    /// </summary>
    public class UserLoginDTO
    {
        /// <summary>
        /// 验证码ID
        /// </summary>
        [Required(ErrorMessage = "验证码ID不能为空")]
        public string? captchaid { get; set; }

        /// <summary>
        /// 验证码Code
        /// </summary>
        [Required(ErrorMessage = "验证码Code不能为空")]
        public string? captchacode { get; set; }

        /// <summary>
        /// 用户名
        /// </summary>
        [Required(ErrorMessage = "用户名不能为空")]
        [MaxLength(10, ErrorMessage = "用户名不能大于10个字符")]
        [MinLength(3, ErrorMessage = "用户名不能小于3个字符")]
        public string? Name { get; set; }

        /// <summary>
        /// 密码
        /// </summary>
        [Required(ErrorMessage = "密码不能为空")]
        [MaxLength(16, ErrorMessage = "密码不能大于16个字符")]
        [MinLength(6, ErrorMessage = "密码不能小于6个字符")]
        public string? Password { get; set; }
    }
}